#include "Sprite.h"

#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 800
#define CircleResolution 100
#define PI 3.14159265358979323846
#define Vector2 D3DXVECTOR2

#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "d3dx9.lib")

class D3DEngine
{
public:
	LPDIRECT3D9 d3d;
	LPDIRECT3DDEVICE9 d3ddev;
	LPD3DXSPRITE pSprite;
	LPD3DXFONT pFont;
	std::vector<LPDIRECT3DTEXTURE9> Textures;
	LPD3DXLINE line;
	D3DXVECTOR2 Camera;

	D3DEngine(HWND);
	void LoadTextures(LPCWSTR *Paths, int count);
	void BeginFrame();
	void DrawSprite(Sprite*, bool);
	void DrawLine(D3DXVECTOR2, D3DXVECTOR2, D3DXCOLOR);
	void DrawLineW(D3DXVECTOR2, D3DXVECTOR2, D3DXCOLOR);
	void DrawRect(D3DXVECTOR2, D3DXVECTOR2, D3DXCOLOR);
	void FillRect(D3DXVECTOR2, D3DXVECTOR2, D3DXCOLOR);
	void DrawCircle(D3DXVECTOR2, float, D3DXCOLOR);
	void DrawCircleW(D3DXVECTOR2, float, D3DXCOLOR);
	void DrawLines(D3DXVECTOR2*, int, D3DXCOLOR);
	void DrawLinesW(D3DXVECTOR2*, int, D3DXCOLOR);
	void DrawString(std::wstring, D3DXVECTOR2, D3DXCOLOR);
	void SetView(D3DXVECTOR2);
	void EndFrame();
	//Sprite D3DEngine::CreateSprite(LPCWSTR f);
	void Dispose();
};
